#include <stdio.h>

#include "track.h"

void track_create (Track *track)
{
  track->process_node = track_process_node;
  track->finalize = track_finalize;
  track_set_bpm (track, 120);
  track_set_beats (track, 4);
  track_set_accent_vol (track, 100);
  track_set_quarter_vol (track, 100);
  track_set_eighth_vol (track, 0);
  track_set_sixteenth_vol (track, 0);
  track_set_triplet_vol (track, 0);
  track_set_accel (track, 0);
}

void track_set_bpm (Track *track, int bpm)
{
  track->bpm = bpm;
}

void track_set_beats (Track *track, int beats)
{
  track->beats = beats;
}

void track_set_accent_vol (Track *track, int vol)
{
  track->avol = vol;
}

void track_set_quarter_vol (Track *track, int vol)
{
  track->qvol = vol;
}

void track_set_eighth_vol (Track *track, int vol)
{
  track->evol = vol;
}

void track_set_sixteenth_vol (Track *track, int vol)
{
  track->svol = vol;
}

void track_set_triplet_vol (Track *track, int vol)
{
  track->tvol = vol;
}

void track_set_accel (Track *track, int accel)
{
  track->accel = accel;
}

void track_process_node (Track *track, CTNode *node)
{
  fprintf (stderr, "process_node callback not implemented\n");
}

void track_finalize (Track *track)
{
  fprintf (stderr, "finalize callback not implemented\n");
}
